﻿@model IEnumerable<PeaceBlogData.Tables.Categories>

@{
    ViewBag.Title = "CategoryList";
    Layout = "~/Views/_PeaceAdminLayout.cshtml";
}

@Html.Partial("AdminPartial/AdminTitle", new PeaceBlog.Models.Types.AdminTitle()
{
    Title = ViewBag.Title,
    FirstLink = Html.ActionLink("Kategoriler", "CategoryList")
});

<div class="row-fluid">
    <div class="span12">

        <div class="widget">
            <div class="widget-title">
                <h4><i class="icon-reorder"></i>@ViewBag.Title</h4>

            </div>
            <div class="widget-body">
                <table class="table table-striped table-bordered" id="sample_1">
                    <thead>
                        <tr>
                            <th style="width:8px;">
                                <input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes" />
                            </th>
                            <th>
                                @Html.DisplayNameFor(model => model.FileID)
                            </th>
                            <th>
                                @Html.DisplayNameFor(model => model.Name)
                            </th>
                            <th>@Html.DisplayNameFor(model => model.ShortName)</th>
                            <th class="hidden-phone">@Html.DisplayNameFor(model => model.SortNo)</th>
                            <th class="hidden-phone">Alt Kategori</th>
                            <th class="hidden-phone">@Html.DisplayNameFor(model => model.SaveDate)</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var item in Model)
                        {
                            <tr class="odd gradeX">
                                <td><input type="checkbox" class="checkboxes" value="@item.CategoryID" /></td>
                                <td>
                                    @Html.ImageUrl(item.FileID, true, 50, 50, item.Name)
                                </td>
                                <td class="hidden-phone">
                                    @Html.ActionLink(item.Name, "", new { Id = item.CategoryID })
                                </td>
                                <td class="center hidden-phone">@item.ShortName</td>
                                <td class="center hidden-phone">@item.SortNo</td>
                                <td class="center hidden-phone">
                                    @item.SubCategoryID
                                </td>
                                <td class="hidden-phone">
                                    @item.SaveDate.ToString("MMMM, dd yyyy")
                                </td>
                            </tr>
                        }
                    </tbody>
                </table>
            </div>
        </div>
        <!-- END EXAMPLE TABLE widget-->
    </div>
</div>

@section Scripts{
    <script type="text/javascript" src="~/Templates/Admin/assets/uniform/jquery.uniform.min.js"></script>
    <script type="text/javascript" src="~/Templates/Admin/assets/data-tables/jquery.dataTables.js"></script>
    <script type="text/javascript" src="~/Templates/Admin/assets/data-tables/DT_bootstrap.js"></script>
}